package tr.edu.metu.is.mega.server.validation;

import java.util.Map;

import tr.edu.metu.is.mega.client.service.GwtValidationService;
import tr.edu.metu.is.mega.common.ValidationAttributeValue;
import tr.edu.metu.is.mega.common.ValidationConstraint;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * GWT validation service implementation.
 */
public class GwtValidationServiceImpl extends RemoteServiceServlet implements GwtValidationService {

    private static final long serialVersionUID = 2373530387264044468L;

    /**
     * {@inheritDoc}
     */
    @Override
    public Map<String, Map<ValidationConstraint, ValidationAttributeValue>> getValidationConstraints(String clazz) {
        return ValidationAttributeManager.getInstance().getValidationAttributes(clazz);
    }

}
